

.toolbar {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  backdrop-filter: blur(10px);
  z-index: 100;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.toolbar-left {
  left: 85px;
}

.toolbar-right {
  right: 85px;
}

.toolbar-bottom {
  position: fixed;
  left: 50%;
  bottom: 90px;
  transform: translate(-50%, calc(100% + 40px));
  height: 56px;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0 16px;
  backdrop-filter: blur(10px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
}

.toolbar-button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0;
  cursor: pointer;
  color: #5f6368;
  transition: all 0.2s ease;
  position: relative;
}

.toolbar-button:hover {
  background-color: #f1f3f4;
  color: #1a73e8;
}

.toolbar-button.tool-button--selected {
  background: #1f6feb;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(31, 111, 235, 0.35);
}

.toolbar-button.tool-button--selected img {
  filter: brightness(0) invert(1);
}

.toolbar-button.is-active {
  background-color: #e8f0fe;
  color: #1a73e8;
  box-shadow: 0 0 0 1px rgba(26, 115, 232, 0.2);
}

.toolbar-button img {
  width: 20px;
  height: 20px;
}

.toolbar-button[data-tooltip]::after,
.toolbar-button[data-tooltip]::before {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toolbar-button[data-tooltip]::after {
  content: attr(data-tooltip);
  top: 50%;
  transform: translateY(-50%) translateX(0);
  background: rgba(26, 32, 44, 0.9);
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.toolbar-left .toolbar-button[data-tooltip]::after {
  left: calc(100% + 14px);
}

.toolbar-right .toolbar-button[data-tooltip]::after {
  right: calc(100% + 14px);
}

.toolbar-bottom .toolbar-button[data-tooltip]::after {
  top: auto;
  bottom: calc(100% + 10px);
  left: 50%;
  right: auto;
  transform: translate(-50%, 0);
}

.toolbar-button[data-tooltip]:hover::after,
.toolbar-button[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.toolbar-bottom .toolbar-button[data-tooltip]:hover::after,
.toolbar-bottom .toolbar-button[data-tooltip]:focus-visible::after {
  transform: translate(-50%, 0);
}

body.simple-mode-active .toolbar-left {
  transform: translate(-180%, -50%);
  opacity: 0;
  pointer-events: none;
}

body.simple-mode-active .toolbar-right {
  transform: translate(180%, -50%);
  opacity: 0;
  pointer-events: none;
}

body.simple-mode-active .toolbar-bottom {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
  visibility: visible;
}
